package com.hyacinth.springmvcdemo.config;

import com.hyacinth.springmvcdemo.entity.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UserInfoConfig {
    @Bean("user1")
    public UserInfo userInfo1() {
        UserInfo userInfo = new UserInfo();
        userInfo.setId(1);
        return userInfo;
    }

    @Bean("user2")
    public UserInfo userInfo2() {
        UserInfo userInfo = new UserInfo();
        userInfo.setId(2);
        return userInfo;
    }

    @Bean("user3")
    public UserInfo userInfo3() {
        UserInfo userInfo = new UserInfo();
        userInfo.setId(3);
        return userInfo;
    }
}
